home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / muds / lpmud312.tar / lpmud312 / prelang.y < prev    next >
Text File  |  1992-02-10  |  19KB  |  651 lines

  1. %{
  2. # line 3 "prelang.y"
  3. /* The above line is to give proper line number references. Please mail me
  4.  * if your compiler complains about it.
  5.  */
  6. /*
  7.  * This is the grammar definition of LPC. The token table is built
  8.  * automatically by make_func. The lang.y is constructed from this file,
  9.  * the generated token list and post_lang.y. The reason of this is that there
  10.  * is no #include-statment that yacc recognizes.
  11.  */
  12. #include <string.h>
  13. #include <stdio.h>
  14. #include <memory.h>
  15. #if defined(sun)
  16. #include <alloca.h>
  17. #endif
  18.  
  19. #include "lint.h"
  20. #include "interpret.h"
  21. #include "object.h"
  22. #include "exec.h"
  23. #include "config.h"
  24. #include "instrs.h"
  25. #include "incralloc.h"
  26. #include "switch.h"
  27.  
  28. #if defined(__GNUC__) && !defined(lint) && !defined(DEBUG)
  29. #define INLINE inline
  30. #else
  31. #define INLINE
  32. #endif
  33.  
  34. #define YYMAXDEPTH    600
  35.  
  36. /* NUMPAREAS areas are saved with the program code after compilation.
  37.  */
  38. #define A_PROGRAM        0
  39. #define A_FUNCTIONS        1
  40. #define A_STRINGS        2
  41. #define A_VARIABLES        3
  42. #define A_LINENUMBERS        4
  43. #define A_INHERITS        5
  44. #define A_ARGUMENT_TYPES    6
  45. #define A_ARGUMENT_INDEX    7
  46. #define NUMPAREAS        8
  47. #define A_CASE_NUMBERS        8
  48. #define A_CASE_STRINGS        9
  49. #define A_CASE_LABELS           10
  50. #define NUMAREAS           11
  51.  
  52. #define BREAK_ON_STACK        0x40000
  53. #define BREAK_FROM_CASE        0x80000
  54.  
  55. /* make shure that this struct has a size that is a power of two */
  56. struct case_heap_entry { int key; short addr; short line; };
  57. #define CASE_HEAP_ENTRY_ALIGN(offset) offset &= -sizeof(struct case_heap_entry)
  58.  
  59. static struct mem_block mem_block[NUMAREAS];
  60.  
  61. /*
  62.  * Some good macros to have.
  63.  */
  64.  
  65. #define BASIC_TYPE(e,t) ((e) == TYPE_ANY ||\
  66.              (e) == (t) ||\
  67.              (t) == TYPE_ANY)
  68.  
  69. #define TYPE(e,t) (BASIC_TYPE((e) & TYPE_MOD_MASK, (t) & TYPE_MOD_MASK) ||\
  70.            (((e) & TYPE_MOD_POINTER) && ((t) & TYPE_MOD_POINTER) &&\
  71.             BASIC_TYPE((e) & (TYPE_MOD_MASK & ~TYPE_MOD_POINTER),\
  72.                    (t) & (TYPE_MOD_MASK & ~TYPE_MOD_POINTER))))
  73.  
  74. #define FUNCTION(n) ((struct function *)mem_block[A_FUNCTIONS].block + (n))
  75. #define VARIABLE(n) ((struct variable *)mem_block[A_VARIABLES].block + (n))
  76.  
  77. #define align(x) (((x) + 3) & ~3)
  78.  
  79. /*
  80.  * If the type of the function is given, then strict types are
  81.  * checked and required.
  82.  */
  83. static int exact_types;
  84. extern int pragma_strict_types;    /* Maintained by lex.c */
  85. extern int pragma_save_types;    /* Also maintained by lex.c */
  86. int approved_object;        /* How I hate all these global variables */
  87.  
  88. extern int total_num_prog_blocks, total_prog_block_size;
  89.  
  90. extern int num_parse_error;
  91. extern int d_flag;
  92. static int heart_beat;        /* Number of the heart beat function */
  93.  
  94. static int current_break_address;
  95. static int current_continue_address;
  96. static int current_case_number_heap;
  97. static int current_case_string_heap;
  98. #define SOME_NUMERIC_CASE_LABELS 0x40000
  99. #define NO_STRING_CASE_LABELS    0x80000
  100. static int zero_case_label;
  101. static int current_type;
  102.  
  103. static int last_push_indexed;
  104. static int last_push_local;
  105. static int last_push_identifier;
  106.  
  107. /*
  108.  * There is always function starting at address 0, which will execute
  109.  * the initialization code. This code is spread all over the program,
  110.  * with jumps to next initializer. The next variable keeps track of
  111.  * the previous jump. After the last initializer, the jump will be changed
  112.  * into a return(0) statement instead.
  113.  *
  114.  * A function named '__INIT' will be defined, which will contain the
  115.  * initialization code. If there was no initialization code, then the
  116.  * function will not be defined. That is the usage of the
  117.  * first_last_initializer_end variable.
  118.  *
  119.  * When inheriting from another object, a call will automatically be made
  120.  * to call __INIT in that code from the current __INIT.
  121.  */
  122. static int last_initializer_end;
  123. static int first_last_initializer_end;
  124.  
  125. static struct program NULL_program; /* marion - clean neat empty struct */
  126.  
  127. void epilog();
  128. static int check_declared PROT((char *str));
  129. static void prolog();
  130. static char *get_two_types PROT((int type1, int type2));
  131. void free_all_local_names(),
  132.     add_local_name PROT((char *, int)), smart_log PROT((char *, int, char *));
  133. extern int yylex();
  134. static int verify_declared PROT((char *));
  135. static void copy_variables();
  136. static int copy_functions PROT((struct program *, int type));
  137. void type_error PROT((char *, int));
  138.  
  139. char *xalloc(), *string_copy();
  140.  
  141. extern int current_line;
  142. /*
  143.  * 'inherit_file' is used as a flag. If it is set to a string
  144.  * after yyparse(), this string should be loaded as an object,
  145.  * and the original object must be loaded again.
  146.  */
  147. extern char *current_file, *inherit_file;
  148.  
  149. /*
  150.  * The names and types of arguments and auto variables.
  151.  */
  152. char *local_names[MAX_LOCAL];
  153. unsigned short type_of_locals[MAX_LOCAL];
  154. int current_number_of_locals = 0;
  155. int current_break_stack_need = 0  ,max_break_stack_need = 0;
  156.  
  157. /*
  158.  * The types of arguments when calling functions must be saved,
  159.  * to be used afterwards for checking. And because function calls
  160.  * can be done as an argument to a function calls,
  161.  * a stack of argument types is needed. This stack does not need to
  162.  * be freed between compilations, but will be reused.
  163.  */
  164. static struct mem_block type_of_arguments;
  165.  
  166. struct program *prog;    /* Is returned to the caller of yyparse */
  167.  
  168. /*
  169.  * Compare two types, and return true if they are compatible.
  170.  */
  171. static int compatible_types(t1, t2)
  172.     int t1, t2;
  173. {
  174.     if (t1 == TYPE_UNKNOWN || t2 == TYPE_UNKNOWN)
  175.     return 0;
  176.     if (t1 == t2)
  177.     return 1;
  178.     if (t1 == TYPE_ANY || t2 == TYPE_ANY)
  179.     return 1;
  180.     if ((t1 & TYPE_MOD_POINTER) && (t2 & TYPE_MOD_POINTER)) {
  181.     if ((t1 & TYPE_MOD_MASK) == (TYPE_ANY|TYPE_MOD_POINTER) ||
  182.         (t2 & TYPE_MOD_MASK) == (TYPE_ANY|TYPE_MOD_POINTER))
  183.         return 1;
  184.     }
  185.     return 0;
  186. }
  187.  
  188. /*
  189.  * Add another argument type to the argument type stack
  190.  */
  191. INLINE
  192. static void add_arg_type(type)
  193.     unsigned short type;
  194. {
  195.     struct mem_block *mbp = &type_of_arguments;
  196.     while (mbp->current_size + sizeof type > mbp->max_size) {
  197.     mbp->max_size <<= 1;
  198.     mbp->block = realloc((char *)mbp->block, mbp->max_size);
  199.     }
  200.     memcpy(mbp->block + mbp->current_size, &type, sizeof type);
  201.     mbp->current_size += sizeof type;
  202. }
  203.  
  204. /*
  205.  * Pop the argument type stack 'n' elements.
  206.  */
  207. INLINE
  208. static void pop_arg_stack(n)
  209.     int n;
  210. {
  211.     type_of_arguments.current_size -= sizeof (unsigned short) * n;
  212. }
  213.  
  214. /*
  215.  * Get type of argument number 'arg', where there are
  216.  * 'n' arguments in total in this function call. Argument
  217.  * 0 is the first argument.
  218.  */
  219. INLINE
  220. int get_argument_type(arg, n)
  221.     int arg, n;
  222. {
  223.     return
  224.     ((unsigned short *)
  225.      (type_of_arguments.block + type_of_arguments.current_size))[arg - n];
  226. }
  227.  
  228. INLINE
  229. static void add_to_mem_block(n, data, size)
  230.     int n, size;
  231.     char *data;
  232. {
  233.     struct mem_block *mbp = &mem_block[n];
  234.     while (mbp->current_size + size > mbp->max_size) {
  235.     mbp->max_size <<= 1;
  236.     mbp->block = realloc((char *)mbp->block, mbp->max_size);
  237.     }
  238.     memcpy(mbp->block + mbp->current_size, data, size);
  239.     mbp->current_size += size;
  240. }
  241.  
  242. static void ins_byte(b)
  243.     char b;
  244. {
  245.     add_to_mem_block(A_PROGRAM, &b, 1);
  246. }
  247.  
  248. /*
  249.  * Store a 2 byte number. It is stored in such a way as to be sure
  250.  * that correct byte order is used, regardless of machine architecture.
  251.  * Also beware that some machines can't write a word to odd addresses.
  252.  */
  253. static void ins_short(l)
  254.     short l;
  255. {
  256.     add_to_mem_block(A_PROGRAM, (char *)&l + 0, 1);
  257.     add_to_mem_block(A_PROGRAM, (char *)&l + 1, 1);
  258. }
  259.  
  260. static void upd_short(offset, l)
  261.     int offset;
  262.     short l;
  263. {
  264.     mem_block[A_PROGRAM].block[offset + 0] = ((char *)&l)[0];
  265.     mem_block[A_PROGRAM].block[offset + 1] = ((char *)&l)[1];
  266. }
  267.  
  268. static short read_short(offset)
  269.     int offset;
  270. {
  271.     short l;
  272.  
  273.     ((char *)&l)[0] = mem_block[A_PROGRAM].block[offset + 0];
  274.     ((char *)&l)[1] = mem_block[A_PROGRAM].block[offset + 1];
  275.     return l;
  276. }
  277.  
  278. /*
  279.  * Store a 4 byte number. It is stored in such a way as to be sure
  280.  * that correct byte order is used, regardless of machine architecture.
  281.  */
  282. static void ins_long(l)
  283.     int l;
  284. {
  285.     add_to_mem_block(A_PROGRAM, (char *)&l+0, 1);
  286.     add_to_mem_block(A_PROGRAM, (char *)&l+1, 1);
  287.     add_to_mem_block(A_PROGRAM, (char *)&l+2, 1);
  288.     add_to_mem_block(A_PROGRAM, (char *)&l+3, 1);
  289. }
  290.  
  291. static void ins_f_byte(b)
  292.     unsigned int b;
  293. {
  294.     ins_byte((char)(b - F_OFFSET));
  295. }
  296.  
  297. /*
  298.  * Return the index of the function found, otherwise -1.
  299.  */
  300. static int defined_function(s)
  301.     char *s;
  302. {
  303.     int offset;
  304.     struct function *funp;
  305.  
  306.     for (offset = 0; offset < mem_block[A_FUNCTIONS].current_size;
  307.      offset += sizeof (struct function)) {
  308.     funp = (struct function *)&mem_block[A_FUNCTIONS].block[offset];
  309.     if (funp->flags & NAME_HIDDEN)
  310.         continue;
  311.         if (strcmp(funp->name, s) == 0)
  312.         return offset / sizeof (struct function);
  313.     }
  314.     return -1;
  315. }
  316.  
  317. /*
  318.  * A mechanism to remember addresses on a stack. The size of the stack is
  319.  * defined in config.h.
  320.  */
  321. static int comp_stackp;
  322. static int comp_stack[COMPILER_STACK_SIZE];
  323.  
  324. static void push_address() {
  325.     if (comp_stackp >= COMPILER_STACK_SIZE) {
  326.     yyerror("Compiler stack overflow");
  327.     comp_stackp++;
  328.     return;
  329.     }
  330.     comp_stack[comp_stackp++] = mem_block[A_PROGRAM].current_size;
  331. }
  332.  
  333. static void push_explicit(address)
  334.     int address;
  335. {
  336.     if (comp_stackp >= COMPILER_STACK_SIZE) {
  337.     yyerror("Compiler stack overflow");
  338.     comp_stackp++;
  339.     return;
  340.     }
  341.     comp_stack[comp_stackp++] = address;
  342. }
  343.  
  344. static int pop_address() {
  345.     if (comp_stackp == 0)
  346.     fatal("Compiler stack underflow.\n");
  347.     if (comp_stackp > COMPILER_STACK_SIZE) {
  348.     --comp_stackp;
  349.     return 0;
  350.     }
  351.     return comp_stack[--comp_stackp];
  352. }
  353.  
  354. /*
  355.  * Patch a function definition of an inherited function, to what it really
  356.  * should be.
  357.  * The name of the function can be one of:
  358.  *    object::name
  359.  *    ::name
  360.  *    name
  361.  * Where 'object' is the name of the superclass.
  362.  */
  363. static void find_inherited(funp)
  364.     struct function *funp;
  365. {
  366.     int i;
  367.     struct inherit *ip;
  368.     int num_inherits, super_length;
  369.     char *real_name, *super_name = 0, *p;
  370.  
  371.     real_name = funp->name;
  372.     if (real_name[0] == ':')
  373.     real_name = real_name + 2;    /* There will be exactly two ':' */
  374.     else if (p = strchr(real_name, ':')) {
  375.     real_name = p+2;
  376.     super_name = funp->name;
  377.     super_length = real_name - super_name - 2;
  378.     }
  379.     num_inherits = mem_block[A_INHERITS].current_size /
  380.     sizeof (struct inherit);
  381.     ip = (struct inherit *)mem_block[A_INHERITS].block;
  382.     for (; num_inherits > 0; ip++, num_inherits--) {
  383.     if (super_name) {
  384.         int l = strlen(ip->prog->name);    /* Including .c */
  385.         if (l - 2 < super_length)
  386.         continue;
  387.         if (strncmp(super_name, ip->prog->name + l - 2 - super_length,
  388.             super_length) != 0)
  389.         continue;
  390.     }
  391.     for (i=0; i < ip->prog->num_functions; i++) {
  392.         if (ip->prog->functions[i].flags & (NAME_UNDEFINED|NAME_HIDDEN))
  393.         continue;
  394.         if (strcmp(ip->prog->functions[i].name, real_name) != 0)
  395.         continue;
  396.         funp->offset = ip - (struct inherit *)mem_block[A_INHERITS].block;
  397.         funp->flags = ip->prog->functions[i].flags | NAME_INHERITED;
  398.         funp->num_local = ip->prog->functions[i].num_local;
  399.         funp->num_arg = ip->prog->functions[i].num_arg;
  400.         funp->type = ip->prog->functions[i].type;
  401.         funp->function_index_offset = i;
  402.         return;
  403.     }
  404.     }
  405.     return;
  406. }
  407.  
  408. /*
  409.  * Define a new function. Note that this function is called at least twice
  410.  * for alll function definitions. First as a prototype, then as the real
  411.  * function. Thus, there are tests to avoid generating error messages more
  412.  * than once by looking at (flags & NAME_PROTOTYPE).
  413.  */
  414. static int define_new_function(name, num_arg, num_local, offset, flags, type)
  415.     char *name;
  416.     int num_arg, num_local;
  417.     int offset, flags, type;
  418. {
  419.     int num;
  420.     struct function fun;
  421.     unsigned short argument_start_index;
  422.  
  423.     num = defined_function(name);
  424.     if (num >= 0) {
  425.     struct function *funp;
  426.  
  427.     /*
  428.      * The function was already defined. It may be one of several reasons:
  429.      *
  430.      * 1.    There has been a prototype.
  431.      * 2.    There was the same function defined by inheritance.
  432.      * 3.    This function has been called, but not yet defined.
  433.      * 4.    The function is doubly defined.
  434.      * 5.    A "late" prototype has been encountered.
  435.      */
  436.     funp = (struct function *)(mem_block[A_FUNCTIONS].block) + num;
  437.     if (!(funp->flags & NAME_UNDEFINED) &&
  438.         !(flags & NAME_PROTOTYPE) &&
  439.         !(funp->flags & NAME_INHERITED))
  440.     {
  441.         char buff[500];
  442.         sprintf(buff, "Redeclaration of function %s.", name);
  443.         yyerror(buff);
  444.         return num;
  445.     }
  446.     /*
  447.      * It was either an undefined but used funtion, or an inherited
  448.      * function. In both cases, we now consider this to be THE new
  449.      * definition. It might also have been a prototype to an already
  450.      * defined function.
  451.      *
  452.      * Check arguments only when types are supposed to be tested,
  453.      * and if this function really has been defined already.
  454.      *
  455.      * 'nomask' functions may not be redefined.
  456.      */
  457.     if ((funp->type & TYPE_MOD_NO_MASK) &&
  458.         !(funp->flags & NAME_PROTOTYPE) &&
  459.         !(flags & NAME_PROTOTYPE))
  460.     {
  461.         char *p = (char *)alloca(80 + strlen(name));
  462.         sprintf(p, "Illegal to redefine 'nomask' function \"%s\"",name);
  463.         yyerror(p);
  464.     }
  465.     if (exact_types && funp->type != TYPE_UNKNOWN) {
  466.         int i;
  467.         if (funp->num_arg != num_arg && !(funp->type & TYPE_MOD_VARARGS))
  468.         yyerror("Incorrect number of arguments.");
  469.         else if (!(funp->flags & NAME_STRICT_TYPES))
  470.         yyerror("Called function not compiled with type testing.");
  471.         else {
  472.         /* Now check that argument types wasn't changed. */
  473.         for (i=0; i < num_arg; i++) {
  474.         }
  475.         }
  476.     }
  477.     /* If it was yet another prototype, then simply return. */
  478.     if (flags & NAME_PROTOTYPE)
  479.         return num;
  480.     funp->num_arg = num_arg;
  481.     funp->num_local = num_local;
  482.     funp->flags = flags;
  483.     funp->offset = offset;
  484.     funp->function_index_offset = 0;
  485.     funp->type = type;
  486.     if (exact_types)
  487.         funp->flags |= NAME_STRICT_TYPES;
  488.     return num;
  489.     }
  490.     if (strcmp(name, "heart_beat") == 0)
  491.     heart_beat = mem_block[A_FUNCTIONS].current_size /
  492.         sizeof (struct function);
  493.     fun.name = make_shared_string(name);
  494.     fun.offset = offset;
  495.     fun.flags = flags;
  496.     fun.num_arg = num_arg;
  497.     fun.num_local = num_local;
  498.     fun.function_index_offset = 0;
  499.     fun.type = type;
  500.     if (exact_types)
  501.     fun.flags |= NAME_STRICT_TYPES;
  502.     num = mem_block[A_FUNCTIONS].current_size / sizeof fun;
  503.     /* Number of local variables will be updated later */
  504.     add_to_mem_block(A_FUNCTIONS, (char *)&fun, sizeof fun);
  505.  
  506.     if (exact_types == 0 || num_arg == 0) {
  507.     argument_start_index = INDEX_START_NONE;
  508.     } else {
  509.     int i;
  510.  
  511.     /*
  512.      * Save the start of argument types.
  513.      */
  514.     argument_start_index =
  515.         mem_block[A_ARGUMENT_TYPES].current_size /
  516.         sizeof (unsigned short);
  517.     for (i=0; i < num_arg; i++) {
  518.         add_to_mem_block(A_ARGUMENT_TYPES, &type_of_locals[i],
  519.                  sizeof type_of_locals[i]);
  520.     }
  521.     }
  522.     add_to_mem_block(A_ARGUMENT_INDEX, &argument_start_index,
  523.              sizeof argument_start_index);
  524.     return num;
  525. }
  526.  
  527. static void define_variable(name, type, flags)
  528.     char *name;
  529.     int type;
  530.     int flags;
  531. {
  532.     struct variable dummy;
  533.     int n;
  534.  
  535.     n = check_declared(name);
  536.     if (n != -1 && (VARIABLE(n)->type & TYPE_MOD_NO_MASK)) {
  537.     char *p = (char *)alloca(80 + strlen(name));
  538.     sprintf(p, "Illegal to redefine 'nomask' variable \"%s\"", name);
  539.     yyerror(p);
  540.     }
  541.     dummy.name = make_shared_string(name);
  542.     dummy.type = type;
  543.     dummy.flags = flags;
  544.     add_to_mem_block(A_VARIABLES, (char *)&dummy, sizeof dummy);
  545. }
  546.  
  547. short store_prog_string(str)
  548.     char *str;
  549. {
  550.     short i;
  551.     char **p;
  552.  
  553.     p = (char **) mem_block[A_STRINGS].block;
  554.     str = make_shared_string(str);
  555.     for (i=mem_block[A_STRINGS].current_size / sizeof str -1; i>=0; --i)
  556.     if (p[i] == str)  {
  557.         free_string(str); /* Needed as string is only free'ed once. */
  558.         return i;
  559.     }
  560.  
  561.     add_to_mem_block(A_STRINGS, &str, sizeof str);
  562.     return mem_block[A_STRINGS].current_size / sizeof str - 1;
  563. }
  564.  
  565. void add_to_case_heap(block_index,entry)
  566.     int block_index;
  567.     struct case_heap_entry *entry;
  568. {
  569.     char *heap_start;
  570.     int offset,parent;
  571.     int current_heap;
  572.  
  573.     if ( block_index == A_CASE_NUMBERS )
  574.         current_heap = current_case_number_heap;
  575.     else
  576.         current_heap = current_case_string_heap;
  577.     offset = mem_block[block_index].current_size - current_heap;
  578.     add_to_mem_block(block_index, (char*)entry, sizeof(*entry) );
  579.     heap_start = mem_block[block_index].block + current_heap;
  580.     for ( ; offset; offset = parent ) {
  581.         parent = ( offset - sizeof(struct case_heap_entry) ) >> 1 ;
  582.         CASE_HEAP_ENTRY_ALIGN(parent);
  583.         if ( ((struct case_heap_entry*)(heap_start+offset))->key <
  584.              ((struct case_heap_entry*)(heap_start+parent))->key )
  585.         {
  586.             *(struct case_heap_entry*)(heap_start+offset) =
  587.             *(struct case_heap_entry*)(heap_start+parent);
  588.             *(struct case_heap_entry*)(heap_start+parent) = *entry;
  589.         }
  590.     }
  591. }
  592.  
  593. /*
  594.  * Arrange a jump to the current position for the initialization code
  595.  * to continue.
  596.  */
  597. static void transfer_init_control() {
  598.     if (mem_block[A_PROGRAM].current_size - 2 == last_initializer_end)
  599.     mem_block[A_PROGRAM].current_size -= 3;
  600.     else {
  601.     /*
  602.      * Change the address of the last jump after the last
  603.      * initializer to this point.
  604.      */
  605.     upd_short(last_initializer_end,
  606.           mem_block[A_PROGRAM].current_size);
  607.     }
  608. }
  609.  
  610. void add_new_init_jump();
  611. %}
  612.  
  613. /*
  614.  * These values are used by the stack machine, and can not be directly
  615.  * called from LPC.
  616.  */
  617. %token F_JUMP F_JUMP_WHEN_ZERO F_JUMP_WHEN_NON_ZERO
  618. %token F_POP_VALUE F_DUP
  619. %token F_STORE F_CALL_FUNCTION_BY_ADDRESS
  620. %token F_PUSH_IDENTIFIER_LVALUE F_PUSH_LOCAL_VARIABLE_LVALUE
  621. %token F_PUSH_INDEXED_LVALUE F_INDIRECT F_INDEX
  622. %token F_CONST0 F_CONST1
  623.  
  624. /*
  625.  * These are the predefined functions that can be accessed from LPC.
  626.  */
  627.  
  628. %token F_IF F_IDENTIFIER F_LAND F_LOR F_STATUS
  629. %token F_RETURN F_STRING
  630. %token F_INC F_DEC
  631. %token F_POST_INC F_POST_DEC F_COMMA
  632. %token F_NUMBER F_ASSIGN F_INT F_ADD F_SUBTRACT F_MULTIPLY
  633. %token F_DIVIDE F_LT F_GT F_EQ F_GE F_LE
  634. %token F_NE
  635. %token F_ADD_EQ F_SUB_EQ F_DIV_EQ F_MULT_EQ
  636. %token F_NEGATE
  637. %token F_SUBSCRIPT F_WHILE F_BREAK
  638. %token F_DO F_FOR F_SWITCH
  639. %token F_SSCANF F_PARSE_COMMAND F_STRING_DECL F_LOCAL_NAME
  640. %token F_ELSE F_DESCRIBE
  641. %token F_CONTINUE
  642. %token F_MOD F_MOD_EQ F_INHERIT F_COLON_COLON
  643. %token F_STATIC
  644. %token F_ARROW F_AGGREGATE
  645. %token F_COMPL F_AND F_AND_EQ F_OR F_OR_EQ F_XOR F_XOR_EQ
  646. %token F_LSH F_LSH_EQ F_RSH F_RSH_EQ
  647. %token F_CATCH
  648. %token F_OBJECT F_VOID F_MIXED F_PRIVATE F_NO_MASK F_NOT
  649. %token F_PROTECTED F_PUBLIC
  650. %token F_VARARGS
  651.